package com.juntu.firelogin;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;

import com.juntu.loginlib.ui.BaseLoginActivity;

/**
 * Created by cj on 2021/2/19.
 * Email:codesexy@163.com
 * Function:
 * desc:
 */
public class LoginActivity extends BaseLoginActivity {
    private static final String TAG = "LoginActivity";

    @Override
    protected int getLayoutId() {
        return R.layout.activity_login;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);
        final EditText userName = findViewById(R.id.userName);
        final EditText psw = findViewById(R.id.psw);

        findViewById(R.id.login).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                doLogin(userName.getText().toString(), psw.getText().toString(), "JCKZPB", "HFZHZX");
            }
        });
    }



    @Override
    protected void startMainActivity() {
        startActivity(new Intent(this, MainActivity.class));
    }

    @Override
    protected void parseConfig(String config) {
        Log.e(TAG, config);
    }

    @Override
    protected void saveLoginInfo(String loginResult) {
        Log.e(TAG, loginResult);
    }
}
